package com.sikaryofficial.workbench.domain.mapping;

import com.sikaryofficial.system.api.domain.order.OrderHeaderVO;
import com.sikaryofficial.workbench.domain.dto.req.order.OrderSaveReq;
import com.sikaryofficial.workbench.domain.dto.resp.order.OrderDTO;
import com.sikaryofficial.workbench.domain.entity.OrderHeader;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : wuweihong
 * @desc : TODO  请填写你的功能描述
 * @date : 2024-09-25
 */
@Mapper
public interface OrderHeaderMapping {

	OrderHeaderMapping INSTANCE = Mappers.getMapper(OrderHeaderMapping.class);

	/**
	 * 实体映射req
	 *
	 * @param req
	 * @return
	 */
	OrderHeader coverToReq(OrderSaveReq req);

	/**
	 * 实体映射resp
	 *
	 * @param orderHeader
	 * @return
	 */
	OrderDTO coverToResp(OrderHeader orderHeader);

	/**
	 * 实体集合映射resp
	 *
	 * @param orderHeaders
	 * @return
	 */
	List<OrderDTO> coverListToResp(List<OrderHeader> orderHeaders);

    OrderHeaderVO coverHeaderToVO(OrderHeader orderHeader);

}
